package com.qi.exception;


import com.qi.common.Status;
import lombok.Getter;

@Getter
public class ServerException extends RuntimeException{
    private Status status;
    private int code;
    private String msg;

    public ServerException(Status status) {
        super(status.getMsg());
        this.status = status;
        this.code = status.getCode();
        this.msg = status.getMsg();
    }

    public ServerException(String msg) {
        this.code = -1;
        this.msg = msg;
    }
}
